package com.woniuxy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.woniuxy.dao.ContractMapper;
import com.woniuxy.pojo.Contract;
import com.woniuxy.pojo.Manager;
import com.woniuxy.service.ContractService;

@Service 
@Transactional
public class ContractServiceImpl implements ContractService {
	@Autowired
	private ContractMapper contractMapper;

	@Override
	public List<Contract> getAll(Integer staffId) {
		return contractMapper.selectAll(staffId);
	}

	@Override
	public void deleteOneById(Integer cid) {
		contractMapper.deleteOne(cid);
	}

	@Override
	public void addOne(Contract contract) {
		contractMapper.addOne(contract);
	}

	@Override
	public int deleteManyByIds(String ids) {
		return contractMapper.deleteManyByIds(ids);
	}

	@Override
	public Contract getContractByCid(Integer cid) {
		return contractMapper.selectOneByCid(cid);
	}

	@Override
	public void saveUpdate(Contract contract) {
		contractMapper.update(contract);
	}

	

}
